<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  </head>
  <body>
    <script nonce={@nonce}>
      document.addEventListener("DOMContentLoaded", function () {
        document.getElementById("sso-req-form").submit();
      });
    </script>
    <div>
      <h1>
        Processing Single Sign-On request...
      </h1>
      <noscript>
        <p>
          Since your browser does not support JavaScript, you must press
          the button below to proceed.
        </p>
      </noscript>
      <.form
        :let={f}
        id="sso-req-form"
        for={@conn}
        action={Routes.sso_path(@conn, :saml_consume, @integration_id)}
      >
        <.input type="hidden" field={f[:email]} />
        <.input type="hidden" field={f[:return_to]} />

        <.button class="w-full" type="submit">sign in</.button>
      </.form>
    </div>
  </body>
</html>
